home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -screenplay- / shareware / amigapmars / aeka.red < prev    next >
Text File  |  1995-04-06  |  4KB  |  95 lines

  1. ;redcode-94
  2. ;name     Aeka
  3. ;kill     Aeka
  4. ;author   T.Hsu
  5. ;strategy Suicidal stone & vector launched, gate busting imp spiral
  6. ;assert   CORESIZE == 8000 && MAXLENGTH >= 100
  7. ;-----------------------------------------------------------------------------
  8. ;  1.0  Original based on Cannonade by P.Kline
  9. ;  1.1  Erase pointer to stone, better decoy, use immediate mode more
  10. ;  1.2  Reposition imps so that they don't cause djn.a to fall through
  11. ;  1.3  Use a decoy that looks like a pointer, put boot ptrs in unused fields
  12. ;  1.4  Use A-field indirection to shorten imp launch code
  13. ;  1.5  Use "spl <0,#vector" instead of "djn.a *(vector-1),#0"
  14. ;       Split before finishing to boot the gate busting imps, better constants
  15. ;  1.6  Back to "djn.a *(vec-1),#0" to be less vulnerable to quick-scanners
  16. ;       Move around decoy code & launch vectors, launch normal imps first
  17. ;  1.7  Back to "spl <0,#vec" to save on space, no decoy
  18. ;       More redundancy in for the imps
  19. ;  1.8  Compress boot code for the gate busting imp
  20. ;  1.9  Made B-field of "djn.a" do double duty as a boot pointer
  21. ;       Made dec_offset help gate against imps during core-clear
  22. ;  2.0  Better use of for/rof in the vector launch
  23. ;
  24. ;  Vulnerabilities
  25. ;  -- hyper-perfect gates (gate busting imps have a tough time with these)
  26. ;  -- anti-imp paper (the stone is not designed to stun/kill paper)
  27. ;  -- suicidal stone (if gate busting imp dies, we don't want stone to die)
  28. ;  -- quick scanners (due to long boot time and use of "spl <0,#vec")
  29.  
  30. imp_sz01    equ     2668
  31. imp_sz02    equ     imp_sz01
  32. imp_sz03    equ     2667
  33. imp_prc01   equ     8
  34. imp_prc02   equ     imp_prc01
  35. imp_prc03   equ     10
  36. imp_off01   equ     -2
  37. imp_off02   equ     0
  38. imp_off03   equ     -7
  39. imp_first   equ     (start-1834)+2*imp_sz02
  40. stone_inc   equ     190
  41. stone_offst equ     701
  42. dec_offst   equ     (imp_sz03*2)-stone_inc
  43.  
  44.             org     start
  45. ;-----------------------------------------------------------------------------
  46. ;  Boot strap
  47.  
  48. start       mov.i   imp_2,imp_first+imp_off02+2 ; gate busting imp
  49.             mov.i   imp_3,imp_first+imp_off03   ; normal imp
  50.             mov.i   <stone_src,@stone_dst2      ; stone
  51.             mov.i   <stone_src,<stone_dst       ;   put B-field of "djn.a"
  52.             mov.i   <stone_src,<stone_dst       ;   to use as the stone_src
  53.             mov.i   <stone_src,<stone_dst
  54.             spl     @stone_dst,<dec_offst
  55.             mov.i   <stone_src,<stone_dst
  56. ;-----------------------------------------------------------------------------
  57. ;  Vector launch the imps
  58.  
  59. imp_split   spl     1,<dec_offst                ; 26 processes
  60.             spl     1,<dec_offst
  61.             mov.i   imp_2,<start                ; finish booting imp
  62. stone_dst   mov.i   -2,#stone_end+1-stone_offst     ;\ notice how these ptrs
  63. stone_dst2  mov.i   -1,#stone_end+1-(stone_offst-1) ;/ are conviently erased
  64.             spl     <0,#imp_vector               ;\ decrement self to launch
  65. stone_src   djn.a   @(imp_vector-1),#stone_end+1 ;/ imps, B-fld before A-fld
  66. ;-----------------------------------------------------------------------------
  67. ;  Self splitting stone and core clear
  68.  
  69. stone       mov.i   <stone_spl+5+stone_inc*800,stone_spl
  70. stone_spl   spl     stone,<dec_offst+stone
  71.             add.f   stone_end+1,stone
  72.             djn.f   stone_spl,<dec_offst+stone
  73. stone_end   mov.i   stone_inc,<-stone_inc
  74. ;-----------------------------------------------------------------------------
  75. ;  Decoy
  76.  
  77. cnt         for     65
  78.             dat     0,0
  79.             rof
  80. ;-----------------------------------------------------------------------------
  81. ;  Launch vectors
  82.  
  83. imp_2       mov.i   #(imp_sz02/2),imp_sz02
  84. imp_3       mov.i   #(imp_sz03/2),imp_sz03
  85.  
  86. imp_A_fld   equ     imp_first+(imp_prc&who+1-2*cnt)*imp_sz&who+imp_off&who
  87. imp_B_fld   equ     imp_first+(imp_prc&who+0-2*cnt)*imp_sz&who+imp_off&who
  88. who         for     3
  89. cnt         for     (imp_prc&who)/2
  90.             jmp     imp_A_fld,imp_B_fld
  91.             rof
  92.             rof
  93. imp_vector
  94.             end
  95.